package com.feihao.zhou.demo01_Thread;

import java.io.FileWriter;
import java.io.IOException;

public class Demo01Test {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("day13-code-WriteAndRead//123.txt",true);

        //一次写一个字符：
        fw.write(98);
        fw.write("\r\n");


        //一次写一个字符数组
        char[] chars = {'d','的','方'};
        fw.write(chars);
        fw.write("\r\n");

        //写一个字符串：
        String s = "你好啊，牛逼";
        fw.write(s);
        fw.write("\r\n");

        //只要牛逼：
        fw.write(s,4,2);

        //

        fw.close();
    }
}
